package com.yyaccp.appinfo.utils;

import lombok.Data;

import java.util.List;

/**
 * @author 天天向上 （john.yi@qq.com）
 * @date 2020/11/23.
 */
@Data
public class PageBean {
    private int pageNo;
    private int pageSize;
    private int total;
    private int totalPages;
    private List dataList;

    public void setTotal(int total) {
        this.total = total;
        this.totalPages = total % pageSize == 0 ? total / pageSize : total / pageSize + 1;
    }
}
